//
//  LBLinkedContentViewContentCell.m
//  LBTwoLinkedScrollingCollectionView
//
//  Created by mac on 2024/6/25.
//

#import "LBLinkedContentViewContentCell.h"

@interface LBLinkedContentViewContentCell ()

@property (nonatomic, strong) UILabel *contentLabel;

@end

@implementation LBLinkedContentViewContentCell

- (instancetype)initWithFrame:(CGRect)frame
{
    if (self = [super initWithFrame:frame]) {
        [self setUpUI];
    }
    return self;
}

- (void)setUpUI
{
    self.contentView.backgroundColor = [UIColor greenColor];
    [self.contentView addSubview:self.contentLabel];
}

- (void)updateWithContent:(NSString *)content
{
    self.contentLabel.text = content;
}

#pragma mark - lazy load

- (UILabel *)contentLabel
{
    if (!_contentLabel) {
        _contentLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 9, 100, 60)];
        _contentLabel.textColor = [UIColor purpleColor];
        _contentLabel.textAlignment = NSTextAlignmentCenter;
        _contentLabel.font = [UIFont systemFontOfSize:17];
        _contentLabel.numberOfLines = 0;
    }
    return _contentLabel;
}
@end
